<script type="text/javascript">
	//List Configuration
	$j("#list_comment").jqGrid({
		url:'comment/list',
		datatype:'json',
		mtype:'POST',
		colNames:['Nombre', 'Descripcion', "Masculino", "Femenino"],
		colModel:[
		          {
			          name:'comment_name',
			          index:'comment_name',
			          width:30,
			          editable: true
			      },
		          {
			          name:'comment',
			          index:'comment',
			          width:50,
			          editable: true,
			          edittype: 'textarea',
			          editoptions: { rows:'3', cols:'30'}
			      },
		          {
			          name:'male',
			          index:'male',
			          width:10,
			          editable: true,
			          edittype: 'checkbox',
			          formatter: 'checkbox',
			          editoptions: { value:"1:0"},
			          align:"center",
				      search:false
			      },
		          {
			          name:'female',
			          index:'female',
			          width:10,
			          editable: true,
			          edittype: 'checkbox',
			          formatter: 'checkbox',
			          editoptions: { value:"1:0"},
			          align:"center",
			          search:false
			      }
		],
		pager:'#gridpager_comment',
		loadtext: 'Cargando Plantillas de Comentarios ...',
		rowNum:10,
		rowList:[10],
		sortname:'comment_name',
		sortorder:'asc',
		autowidth:true,
		viewrecords:true,
		onSelectRow:function(id){},
		editurl:'comment/save',
		scrollOffset:0
		//caption:'Comentarios'
	});

	$j("#list_comment").setGridWidth("670",true);
	$j("#list_comment").setGridHeight(220);
	
	//Form editing
	$j("#list_comment").jqGrid('navGrid',
							   '#gridpager_comment',
							   {
									edit:true,
									add:true,
									del:true,
									search:true
								},
								{
									closeAfterEdit:true,
									editCaption: "Modificar Comentario"
										
								},
								{
									closeAfterAdd:true,
									addCaption: "Nuevo Comentario"
								},
								{
									msg: "¿Desea eliminar el comentario seleccionado?",
									caption: "Eliminar Comentario",
									width:300
								},
								{
									sopt:['eq','bw','ew','cn']
								}
								);

	
</script>
